//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package com.itheima.pinda.authority.dto.auth;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.List;
import javax.validation.constraints.NotNull;

@ApiModel(
        value = "RoleAuthoritySaveDTO",
        description = "角色的资源"
)
public class RoleAuthoritySaveDTO implements Serializable {
    private static final long serialVersionUID = 1L;
    @ApiModelProperty("资源ID")
    private List<Long> menuIdList;
    private List<Long> resourceIdList;
    @ApiModelProperty("角色id")
    @NotNull(
            message = "角色id不能为空"
    )
    private Long roleId;

    public static RoleAuthoritySaveDTOBuilder builder() {
        return new RoleAuthoritySaveDTOBuilder();
    }

    public List<Long> getMenuIdList() {
        return this.menuIdList;
    }

    public List<Long> getResourceIdList() {
        return this.resourceIdList;
    }

    public Long getRoleId() {
        return this.roleId;
    }

    public RoleAuthoritySaveDTO setMenuIdList(final List<Long> menuIdList) {
        this.menuIdList = menuIdList;
        return this;
    }

    public RoleAuthoritySaveDTO setResourceIdList(final List<Long> resourceIdList) {
        this.resourceIdList = resourceIdList;
        return this;
    }

    public RoleAuthoritySaveDTO setRoleId(final Long roleId) {
        this.roleId = roleId;
        return this;
    }

    public RoleAuthoritySaveDTO() {
    }

    public RoleAuthoritySaveDTO(final List<Long> menuIdList, final List<Long> resourceIdList, final Long roleId) {
        this.menuIdList = menuIdList;
        this.resourceIdList = resourceIdList;
        this.roleId = roleId;
    }

    public String toString() {
        return "RoleAuthoritySaveDTO(super=" + super.toString() + ", menuIdList=" + this.getMenuIdList() + ", resourceIdList=" + this.getResourceIdList() + ", roleId=" + this.getRoleId() + ")";
    }

    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof RoleAuthoritySaveDTO)) {
            return false;
        } else {
            RoleAuthoritySaveDTO other = (RoleAuthoritySaveDTO)o;
            if (!other.canEqual(this)) {
                return false;
            } else {
                label47: {
                    Object this$menuIdList = this.getMenuIdList();
                    Object other$menuIdList = other.getMenuIdList();
                    if (this$menuIdList == null) {
                        if (other$menuIdList == null) {
                            break label47;
                        }
                    } else if (this$menuIdList.equals(other$menuIdList)) {
                        break label47;
                    }

                    return false;
                }

                Object this$resourceIdList = this.getResourceIdList();
                Object other$resourceIdList = other.getResourceIdList();
                if (this$resourceIdList == null) {
                    if (other$resourceIdList != null) {
                        return false;
                    }
                } else if (!this$resourceIdList.equals(other$resourceIdList)) {
                    return false;
                }

                Object this$roleId = this.getRoleId();
                Object other$roleId = other.getRoleId();
                if (this$roleId == null) {
                    if (other$roleId != null) {
                        return false;
                    }
                } else if (!this$roleId.equals(other$roleId)) {
                    return false;
                }

                return true;
            }
        }
    }

    protected boolean canEqual(final Object other) {
        return other instanceof RoleAuthoritySaveDTO;
    }

    public int hashCode() {
        boolean PRIME = true;
        int result = 1;
        Object $menuIdList = this.getMenuIdList();
        result = result * 59 + ($menuIdList == null ? 43 : $menuIdList.hashCode());
        Object $resourceIdList = this.getResourceIdList();
        result = result * 59 + ($resourceIdList == null ? 43 : $resourceIdList.hashCode());
        Object $roleId = this.getRoleId();
        result = result * 59 + ($roleId == null ? 43 : $roleId.hashCode());
        return result;
    }

    public static class RoleAuthoritySaveDTOBuilder {
        private List<Long> menuIdList;
        private List<Long> resourceIdList;
        private Long roleId;

        RoleAuthoritySaveDTOBuilder() {
        }

        public RoleAuthoritySaveDTOBuilder menuIdList(final List<Long> menuIdList) {
            this.menuIdList = menuIdList;
            return this;
        }

        public RoleAuthoritySaveDTOBuilder resourceIdList(final List<Long> resourceIdList) {
            this.resourceIdList = resourceIdList;
            return this;
        }

        public RoleAuthoritySaveDTOBuilder roleId(final Long roleId) {
            this.roleId = roleId;
            return this;
        }

        public RoleAuthoritySaveDTO build() {
            return new RoleAuthoritySaveDTO(this.menuIdList, this.resourceIdList, this.roleId);
        }

        public String toString() {
            return "RoleAuthoritySaveDTO.RoleAuthoritySaveDTOBuilder(menuIdList=" + this.menuIdList + ", resourceIdList=" + this.resourceIdList + ", roleId=" + this.roleId + ")";
        }
    }
}
